<?php
/*
  шаблоны свободных виджетов -в папке templates
*/
class LoginWidget extends abstractWidget
{

    private $name = 'LoginWidget';

    function __construct($input_data = null)
    {
        $this->input_data = $input_data;
        //fb($input_data);
        parent::__construct();

        $this->view = $this->registry->get('View');
    }

    function process()
    {
        $this->html = '';


        if (User::isUserLogged()) $mode = 'user';
        else $mode = 'guest';

        $this->view->Set('mode', $mode);

        $this->html = $this->view->fetch('widget.login.basic.tpl');

    } // --


}